/* GSStocksBalanceNoAction.java
 *
 * Project/Product: JZCG-XMBUS
 *
 * Modify Information:
 * =============================================================================
 *   Author	Date       Description
 *   ----------	---------- ---------------------------------------------------
 *   peng.ning	2008-9-1	First release
 *
 * Licensed Materials - Property of APEP
 * =============================================================================
 *    (C) COPYRIGHT Shanghai Auto Mart E-Procurement Co., Ltd. 2007 - 2008
 *    All Rights Reserved.
 *
 *    This software is the confidential and proprietary information of
 *    Shanghai Auto Mart E-Procurement Co., Ltd. ("Confidential Information").
 *    You shall not disclose such Confidential Information and shall use it only
 *    in accordance with the terms of the license agreement you entered into 
 *    with Shanghai Auto Mart E-Procurement Co., Ltd.
 *
 * Noties:
 * =============================================================================
 * 
 */

package com.hitrust.gs.action;

import java.util.ArrayList;

import com.hitrust.gs.bean.GSBalanceMsgBean;
import com.hitrust.gs.bean.GSOperatorBean;
import com.hitrust.gs.business.GSBalanceCategoryProcessor;
import com.hitrust.gs.business.GSManufactureProcessor;
import com.hitrust.gs.business.GSOrganizationProcessor;
import com.hitrust.gs.business.GSStocksProcesser;
import com.hitrust.gs.lib.GSBaseConstants;
import com.hitrust.gs.service.GSBaseAction;
import com.hitrust.gs.service.GSBaseForm;

public class GSStocksBalanceNoAction extends GSBaseAction {
    private GSOrganizationProcessor orpro=new GSOrganizationProcessor();
    private GSStocksProcesser spro=new GSStocksProcesser();
    /* (non-Javadoc)
     * @see com.hitrust.gs.service.GSBaseAction#execute(com.hitrust.gs.service.GSBaseForm)
     */
    public String execute(GSBaseForm aForm) throws Exception {
        // TODO Auto-generated method stub
        String deptId=aForm.getRequest().getParameter("deptId");
        String balanceYM=aForm.getRequest().getParameter("balanceYM");
        String deptCategory=aForm.getRequest().getParameter("deptCategory");
      //取得操作员
        GSOperatorBean oper=(GSOperatorBean) aForm.getSession().getAttribute(GSBaseConstants.LOGIN);
      //出货单位
        ArrayList array=orpro.getOrgSub(oper.getGs_oper_org_id());
        aForm.getRequest().setAttribute("orgship", array);
        //查询结算表
        GSBalanceMsgBean mb=spro.getbanlancemsg(deptId, balanceYM);
        aForm.getRequest().setAttribute("mb", mb);
      //取得所有运营公司
        ArrayList ar=orpro.getOrgWarehouse();
        aForm.getRequest().setAttribute("orgware", ar);
      //种类等级
        GSManufactureProcessor tGSManufProcessor = new GSManufactureProcessor();
        tGSManufProcessor.getManufactureOfLevel(aForm);
        aForm.getRequest().setAttribute("deptId", deptId);
        aForm.getRequest().setAttribute("balanceYM", balanceYM);
        aForm.getRequest().setAttribute("deptCategory", deptCategory);
        return GSBaseConstants.FORWARD_SUCCESS;
    }

}
